<?php
	require_once("actions/CarrieresAction.php");
	$action = new CarrieresAction();
	$action->execute();
	include("header.php");
?>

<script type="text/javascript">
  $(document).ready(function(){
    $("#offre").accordion({autoheight: false});
  });
</script>

<div id='offre'>
	
	<?php
		$resultat = $action->lireCarrieres();
		if (count($resultat)>0)
			foreach($resultat as $ligne){
				$poste = "".$action->lireNode("carrieres","poste");
				$horaire = "".$action->lireNode("carrieres","horaire");
				$embauche = "".$action->lireNode("carrieres","embauche");
	?>			

		<h3><a href="#"><?php echo($ligne[$poste]) ?></a></h3>			
		<!--div vide essentiel a cause du jQuery. ask the guy who made it -->
			
		<div>
			<div id='detailsEmploi'>
				<div id='horaire'><?php echo($ligne[$horaire]) ?></div>
				<div id='embauche'><?php echo($ligne[$embauche]) ?></div>
				<div id="clear"></div>
			</div>
		</div>

	<?php
		}
	?>
	</div>



<?php 
	include("footer.php");
?>